home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 February / macformat-034.iso / mac / Shareware City / Applications / Laughing Bird Folder / The Laughing Bird Restaurant / The Laughing Bird Restaurant.dxr / 00233_PoultryMenu.ls < prev    next >
Encoding:
Text File  |  1995-12-16  |  1.2 KB  |  38 lines

  1. on mouseUp
  2.   global theChoice, gOpenGates, gWhichMenu
  3.   set newLine to the mouseLine
  4.   if newLine < 3 then
  5.     nothing()
  6.   else
  7.     if the foreColor of line newLine of field gWhichMenu <> 5 then
  8.       set the foreColor of line newLine of field "PoultryMenu" to 35
  9.       puppetSound("Click2")
  10.       updateStage()
  11.       alert("Until a password has been entered (at the start of the program), only the recipes in yellow will be accessible.")
  12.       set the foreColor of line newLine of field "PoultryMenu" to 246
  13.       updateStage()
  14.       exit
  15.     end if
  16.     if the foreColor of line newLine of field gWhichMenu = 5 then
  17.       set the foreColor of line newLine of field "PoultryMenu" to 138
  18.       puppetSound("Click2")
  19.       updateStage()
  20.       set the foreColor of line newLine of field "PoultryMenu" to 5
  21.       set theText to line newLine of field "PoultryMenu"
  22.       set numEnd to offset(")", theText)
  23.       if numEnd > 0 then
  24.         set theSelection to char 1 to numEnd - 1 of theText
  25.         set theChoice to value(theSelection)
  26.         put value(theSelection) into field "Count"
  27.         initPush(3, 12, 0)
  28.         init(15, 16, 0)
  29.         go("Recipes")
  30.         RecipeSelect()
  31.         set gWhichMenu to "PoultryMenu"
  32.       else
  33.         exit
  34.       end if
  35.     end if
  36.   end if
  37. end
  38.